﻿<template>
    <div class="text">
      <h2 class="result">检索到0条相关结果</h2>
      <div class="back" @click="back">返回</div>
    </div>
    <div
      style="
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 500px;
      "
    >
      <img
        src="https://assets.soutushenqi.com/picture_free/v1.3.38/assets/empty_image-a7709a07.png"
        alt="NotFound"
        width="150"
      />
      <div
        style="margin-top: 12px; font-size: 16px; color: rgb(102, 102, 102)"
      ></div>
      没有找到此量表，换个关键词试试吧~
      <div class="feedback">
        <img class="addicon" src="../../../../assets/icons/svg/psy-add.svg" />
        <div color="#f26160" @click="showModal = true">
          向我们反馈您未搜索到的量表
        </div>
      </div>
    </div>
    <feedback
      :isVisible="showModal"
      @close="handleClose"
      @submit="handleSubmit"
    ></feedback>
  </template>
  
  <script setup>
  import { defineEmits, ref } from "vue";
  
  import feedback from "./Feedback.vue";
  
  const showModal = ref(false);
  const handleClose = () => {
    showModal.value = false;
  };
  
  const handleSubmit = () => {
    console.log("提交成功");
    showModal.value = false;
  };
  const emits = defineEmits(["back"]);
  // 事件名称为back
  
  const back = () => {
    emits("back", true);
    // 触发事件back，并传递参数
  };
  </script>
  
  <style scoped>
  .text {
    display: flex;
    justify-content: space-between;
    margin-right: 10px;
    margin-left: 10px;
  }
  
  .back {
    margin: 10px;
    font-size: 14px;
    cursor: pointer;
  }
  
  .back:hover {
    color: #f26160;
  }
  
  .feedback {
    display: flex;
    margin-top: 40px;
    cursor: pointer;
  }
  
  .result {
    margin: 10px;
    font-size: 16px;
    font-weight: 700;
  }
  
  .addicon {
    margin-right: 3px;
  }
  </style>
  